<template>
  <div class="about">
    <div class="head">
        <div class="top">
                <div @click="fanhui()">
                    <img src="../../assets/imageZhaoPin/返回白@2x.png" alt="">
                    <span>返回</span>
                </div>
                <div>
                    <span>招聘详情</span>
                </div>
                <div style="width:42px;">
                    <!-- <span>发布</span> -->
                </div>
        </div>
    </div>
    <div class="main">
        <div class="maintext">
             <div class="choes">
                <van-field v-model="value" placeholder="请输入企业名称" label="企业名称" input-align="right" class="inp" readonly/>
            </div>
            <div class="xian"></div>
             <div class="choes">
                <van-field v-model="MENT_TYPE_value" label="招聘类型" input-align="right" class="inp" readonly/>
            </div>
            <div class="xian"></div>
            <div class="choes">
                <van-field v-model="value1" placeholder="请输入信用代码" label="社会信用代码" input-align="right" class="inp" readonly/>
            </div>
            <div class="xian"></div>
            <div class="choes">
                <van-field v-model="value2" placeholder="请输入招聘岗位" label="招聘岗位" input-align="right" class="inp" readonly/>
            </div>
            <div class="xian"></div>
            <div class="choes">
                <van-field v-model="radio" placeholder="请输入姓名" label="岗位性质" input-align="right" class="inp" readonly/>
            </div>
            <div class="xian"></div>
            <!-- <div class="sa1 clear">
            <span >岗位性质</span>
           <van-radio-group v-model="radio"  ref="radio" class="aa" direction="horizontal" disabled>
            <van-radio name="1" class="van" >全职</van-radio>
            <van-radio name="2" class="van" >兼职</van-radio>
            <van-radio name="3" class="van" >小时工</van-radio>
        </van-radio-group>
        </div>
        <div class="xian"></div> -->
         <div class="choes">
            <van-field v-model="value3" placeholder="请输入联系人" label="联系人" input-align="right" class="inp" readonly/>
        </div>
        <div class="xian"></div>
        <div class="choes">
            <van-field v-model="value4" placeholder="请输入联系电话" label="联系电话" input-align="right" class="inp" readonly/>
        </div>
        <div class="xian"></div>
        <div class="sa1 clear">
            <span style="width:110px;">工作地点</span>
            <div class="left" @click="show1=true">
                {{main}}
            </div>
        </div>
        <div class="xian"></div>
        <div class="choes">
            <van-field v-model="value5" placeholder="请输入详细地址" label="详细地址" input-align="right" class="inp" readonly/>
        </div>
        <div class="xian"></div>
        <div class="choes">
            <van-field v-model="radio1" placeholder="请输入学历要求" label="学历要求" input-align="right" class="inp" readonly/>
        </div>
        <div class="xian"></div>
            <!-- <div class="sa1 clear">
            <span >学历要求</span>
           <van-radio-group v-model="radio1"  ref="radio" class="aa" direction="horizontal" disabled>
            <van-radio name="1" class="van" >无要求</van-radio>
            <van-radio name="2" class="van" >本科</van-radio>
            <van-radio name="3" class="van" >大专</van-radio>
            <van-radio name="4" class="van" >其他</van-radio>
        </van-radio-group>
        </div>
        <div class="xian"></div> -->
        <div class="choes">
            <van-field v-model="WH_DIS_value" label="是否允许残疾" input-align="right" class="inp" readonly/>
        </div>
        <div class="xian"></div>
        <div class="choes" v-show="ifCanji === true">
            <van-field v-model="radio2" placeholder="请输入姓名" label="残疾等级" input-align="right" class="inp" readonly/>
        </div>
        <div class="xian" v-show="ifCanji === true"></div>
        <!-- <div class="sa1 clear">
            <span >残疾等级</span>
           <van-radio-group v-model="radio2"  ref="radio" class="aa" direction="horizontal" disabled>
            <van-radio name="1" class="van" >一级</van-radio>
            <van-radio name="2" class="van" >二级</van-radio>
            <van-radio name="3" class="van" >三级</van-radio>
            <van-radio name="4" class="van" >四级</van-radio>
        </van-radio-group>
        </div>
        <div class="xian"></div> -->
        <div class="choes">
              <van-field v-model="value6" placeholder="请输入工作年限" label="工作年限" input-align="right" class="inp" readonly/>
        </div>
        <div class="xian"></div>
        <div class="sa clear">
            <span >工资待遇</span>
            <div class="xx clear">
                <span v-if="va1==undefined">不限</span>
                <span v-else-if="va2==undefined">不限</span>
                <span v-else>{{va1/1000}}k-{{va2/1000}}k</span>
            </div>
        </div>
        <div class="xian"></div>
        <div class="sa clear">
            <span>岗位要求</span>
          <div class="xx clear">
            <span class="contentmore">{{xox0}}</span>
          </div>
        </div>
        <div class="xian"></div>
        <div class="sa clear">
            <span>其他待遇</span>
          <div class="xx clear">
            <span class="contentmore">{{xox}}</span>
          </div>
        </div>
        <div class="xian"></div>
        <div class="sa clear">
            <span>公司介绍</span>
          <div class="xx clear">
            <span class="contentmore">{{xox1}}</span>
          </div>
        </div>
        <div class="xian"></div>
        </div>
    </div>
  </div>
</template>

<script>
import AeraInfo from '../../assets/UseJS/area.js'
import {login} from '../../apiZhaoPin/api'

export default {
  data () {
    return {
      value: '',
      value1: '',
      value2: '',
      value3: '',
      value4: '',
      value5: '',
      value6: '',
      radio: '',
      radio1: '',
      radio2: '',
      show1: false,
      show2: false,
      areaList: '',
      arrArea: [],
      main: '选择地区',
      main1: '选择地区',
      xox: '',
      xox0: '',
      xox1: '',
      va1: '',
      va2: '',
      MENT_TYPE: '',
      MENT_TYPE_value: '',
      WH_DIS_value: '',
      ifCanji: false
    }
  },
  watch: {

  },
  methods: {
    fanhui () {
      this.$router.go(-1)
    },
    aa () {
      var id = this.$route.query.id
      console.log(id)
      login({
        EMPLOY_ID: id
      }).then(res => {
        console.log(res)
        this.radio = res.POSITION_TYPE
        this.radio1 = res.EDUCATION
        // eslint-disable-next-line eqeqeq
        if (res.MENT_TYPE == 1) {
          this.MENT_TYPE_value = '个人'
          // eslint-disable-next-line eqeqeq
        } else if (res.MENT_TYPE == 2) {
          this.MENT_TYPE_value = '企业'
        }
        // eslint-disable-next-line eqeqeq
        if (res.WH_DIS == 0) {
          this.WH_DIS_value = '否'
          // eslint-disable-next-line eqeqeq
        } else if (res.WH_DIS == 1) {
          this.WH_DIS_value = '是'
          this.ifCanji = true
        }
        this.radio2 = res.GRADE
        this.value = res.COMPANY
        this.value1 = res.CODE
        this.value2 = res.POSITION
        this.value3 = res.CONTACT
        this.value4 = res.PHONE
        this.value5 = res.ADDRESS
        this.value6 = res.YEARS
        this.va1 = res.SALARY1
        this.va2 = res.SALARY2
        this.main = res.PROVINCE + res.CITY + res.DISTRICT
        this.xox0 = res.REQUIREMENT
        this.xox = res.OTHER
        this.xox1 = res.INTRODUCE
        if (res.POSITION_TYPE == 1) {
          this.radio = '全职'
        } else if (res.POSITION_TYPE == 2) {
          this.radio = '兼职'
        } else if (res.POSITION_TYPE == 3) {
          this.radio = '小时工'
        }
        if (res.EDUCATION == 2) {
          this.radio1 = '本科'
        } else if (res.EDUCATION == 3) {
          this.radio1 = '大专'
        } else if (res.EDUCATION == 4) {
          this.radio1 = '高中'
        } else if (res.EDUCATION == 1) {
          this.radio1 = '无要求'
        }
        if (res.GRADE == 1) {
          this.radio2 = '一级'
        } else if (res.GRADE == 2) {
          this.radio2 = '二级'
        } else if (res.GRADE == 3) {
          this.radio2 = '三级'
        } else if (res.GRADE == 4) {
          this.radio2 = '四级'
        }
      })
    }

  },
  mounted () {
    window.scrollTo(0, 0)
    document.body.style.backgroundColor = '#FAF9FE'
  },
  created () {
    this.aa()
    document.title = '招聘详情'
  }
}
</script>
<style scoped>
.clear:after {
  content: "";
  display: block;
  clear: both;
}
.clear {
  zoom: 1;
}
.about{
    position: relative;
}
.head{
    width: 100%;
    font-size: 15px;
    font-family: PingFang SC;
    font-weight: bold;
    background: linear-gradient(90deg, #1DA3F1 0%, #1DC7F1 100%);
    color:#fff;
    position: fixed;
    top: 0px;
    z-index: 5;
}
.top{
    width: 92%;
    height: 44px;
    margin: 0px auto;
    display: flex;
    justify-content:space-between;
    align-items:center;
}
.top img{
    width: 7px;
    height: 13px;
    margin-right: 5px;
    margin-top: 5px;
}
.main{
    background-color: #fff;
    margin-top: 44px;
  margin-bottom: 50px;
}
.inp{
    font-size: 15px;
}
/deep/ .van-field__label{
color:#333 !important;
}
/deep/.van-field__label span{
    font-weight: 500;
    color:#333;
}
/deep/.van-cell{
    padding-left: 14px;
    padding-right: 14px;
}
/deep/.van-field__control{
  font-weight: 500;
  color:#999;
}
.xian{
    width: 92%;
    margin: 0px auto;
    border-bottom: 1.5px solid #ebedf0;
    padding-bottom: 1px;
}
.sa1{
    width: 92%;
    margin: 0px auto;
    font-size: 15px;
}
.sa1 span{
    width: 100px;
   float: left;
   font-weight: 500;
    color:#333;
    margin-top: 13px;

}
.aa{
    margin-bottom: 13px;
    display: flex;
    flex-wrap:wrap;

}
.van{
    margin-right: 53.5px;
    margin-top: 13px;

}
.choes span{
    font-size: 15px;
    float: left;
}
.left{
    height: 44px;
    display: flex;
    align-items:center;
    float: right;
    color:#333;
}
.left img{
    width: 13px;
    height: 7px;
    margin-left: 15px;
}
.left strong{
    font-weight: normal;
    color: #fff;
}
.sa{
    width: 92%;
    margin: 0px auto;
    display: flex;
     align-items:center;

}
.sa span{
    font-size: 15px;
    float: left;
    font-weight: 500;
    color:#333;
    width: 100px;
}
.sa .xin{
    float: left;
    position: relative;
}
.sa .xin input{
    float: left;
    width: 75px;
    height: 29px;
    font-size: 15px;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    background: #FAF9FE;

}
.xian1{
    width: 5px;
    border: 1px solid #151515;
    position: absolute;
    top:24px;
    left: 96px;
    transform:scaleY(0.25);

}
textarea{
    height:100px;
    margin-top:15px;
    margin-bottom:15px;
    width:90vw;
    line-height: 20px;
    font-size:15px;
    border: 0px solid #E5E5E5;
    display: flex;
    align-items:center;
    color: #999;
}
.xx span{
    margin-top: 15px;
    margin-bottom: 15px;
    float: right;
    text-align: right;
    width: 260px;
    color:#333;
    font-weight: 500;
  word-wrap:break-word;
  word-break: break-all;
}
.contentmore{
  text-align: left !important;
}
/deep/ .bb .van-radio__icon--disabled .van-icon{
background-color: #1989fa;
    border-color: #1989fa;
    color: #fff;
}
</style>
